<?php
$url = $this->view->cmsUrl(array('module'=>'default','controller'=>'login','action'=>'login'),null,true);
$urlLogout = $this->view->url(array('module'=>'default','controller'=>'login','action'=>'logout'));
$arrParam = $this->view->arrParam;
?>
<?php 
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity()){
	echo '<div style="padding-bottom:10px;margin:auto;" >Hi ' . $auth->getIdentity()->username;
	echo ' - <a href="'.$urlLogout.'">Logout</a><p> </div>';
}else {
?>
<h2 class="mem">Member Login</h2>
<?php if(isset($arrParam['login_error'])) echo '<span style="color:red;">Lỗi đăng nhập<span>';?>
<form name="memberLogin" action="<?php echo $url;?>" method="post">
<label>Enter Your Name</label>
<input type="text" name="username" class="txtBox" />
<label>Enter Your Password</label>
<input type="password" name="password" class="txtBox" />
<input type="submit" name="login" value="Login" class="login" />
<br class="spacer" />
</form>
<?php } ?>